package com.qf.pojo;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @author YDW
 * projectName:project2202_4
 * time:2022/6/9 10:45
 * description:
 */
@Data
@Component
@ConfigurationProperties(prefix = "student")
public class Student {

//    @Value("${students[1].id}")
    private int id;
//    @Value("${students[1].name}")
    private String name;
//    @Value("${students[1].age}")
    private int age;
//    @Value("${person.address.city}")
    private String address;
//    @Value("${arr[0]}")
    private String subject;
    //@Value只能给简单类型赋值
//    @Value("${arr}")
//    private String[] subjects;



}
